package com.example.bookmanagementsystem.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@ResponseBody
@Slf4j
@RequestMapping("/test")
public class TestController {
    @RequestMapping("/t1")
    public Boolean t1(){
        int a= 10/0;
        return true;
    }

    @RequestMapping("/t2")
    public Integer t2(){
        String a = null;
        System.out.println(a.length());
        return 123;
    }

    @RequestMapping("/t3")
    public String t3(){
        int[] a = {1,2,3,4};
        System.out.println(a[4]);
        return "hello";
    }
}
